﻿using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Input;

namespace ReportBrowser.View
{
    /// <summary>
    /// Interaction logic for MessagesView.xaml
    /// </summary>
    public partial class MessagesView : UserControl
    {
        public MessagesView()
        {
            InitializeComponent();
        }

        private void TextBox_KeyDown(object sender, KeyEventArgs e)
        {
            TextBox tb = sender as TextBox;
            if (tb != null && e.Key == Key.Enter)
            {
                BindingExpression be = tb.GetBindingExpression(TextBox.TextProperty);

                be.UpdateSource();
            }
        }
    }
}
